﻿using System;
using System.Runtime.InteropServices;

namespace CSharpUSer
{
    class Program
    {
        //CPP使用C导出，C#使用P/Invoke技术
        [DllImport("YMCppDll.dll")]
        public static extern int Operator(int a, int b);
        static void Main(string[] args)
        {
            int result = Operator(1, 2);
            Console.WriteLine("The result is: {0}", result);
            Console.ReadKey();
        }
    }
}
